﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using EZCRS.HCMS.Entity;

using GFrame.Shadow;
using GFrame.Data;
using EZCRS.HCMS.SqlClient;

namespace EZCRS.HCMS.Bll.baseinfo
{
    public class RateCode
    {
        private sql_hcrs_ratecode _ratedao = new sql_hcrs_ratecode();

        /// <summary>
        /// 保存RateCode
        /// </summary>
        /// <param name="rate"></param>
        /// <param name="ChannelList"></param>
        /// <param name="roomlist"></param>
        /// <param name="Language"></param>
        /// <returns></returns>
        public int Save(HCRS_RateCode rate, List<Channel> ChannelList, Dictionary<string, bool> roomlist, int Language)
        {
            bool b = _ratedao.Save(rate, ChannelList, roomlist, Language);

            if (b)
                return 0;

            return -4;
        }

        public bool IsExist(string Code, int ID, int PID)
        {
            return _ratedao.IsExist(Code, ID, PID);
        }

        public List<HCRS_RATE_CODE_CHANNEL> GetChannelListByRateID(int RateID)
        {
            return _ratedao.GetChannelListByRateID(RateID);
        }
        

    }
}
